package com.coocaa.x.service.litedaemon.daemons.tvpie.player;

import android.os.Parcelable;

import com.coocaa.x.framework.data.JObject;
import com.coocaa.x.service.litedaemon.daemons.tvpie.player.PlayerConstants.PlayerStatus;

public class PlayerExtentionDefine {
    public static final String EXTENTION_ID = "id-playerextention";

    public static class PlayerInitAction {
        public static final String ACTION_CMD = "ACTION_CMD_INIT_PLAYER";

        public static class PlayerInitActionParams extends JObject {
            public String name = "";
            public int totalTime = 0;

            public static final Parcelable.Creator<StartPlayerAction> CREATOR = createCREATOR(
                    StartPlayerAction.class, null);
        }
    }

    public static class PlayerStatusAction {
        public static final String ACTION_CMD = "ACTION_CMD_STATUS_PLAYER";

        public static class PlayerStatusActionParams extends JObject {
            public PlayerStatus status = null;

            public static final Parcelable.Creator<StartPlayerAction> CREATOR = createCREATOR(
                    StartPlayerAction.class, null);
        }
    }

    public static class SetNextVideoAction {
        public static final String ACTION_CMD = "ACTION_CMD_SET_NEXT_VIDEO";

        public static class SetNextVideoParams extends JObject {
            public String name = null;
            public String url = null;

            public static final Parcelable.Creator<SetNextVideoAction> CREATOR = createCREATOR(
                    SetNextVideoAction.class, null);
        }
    }

    public static class PlayerReadyAction {
        public static final String ACTION_CMD = "ACTION_CMD_PLAY_READY";

        public static class PlayerReadyParams extends JObject {
            public String name = null;

            public static final Parcelable.Creator<PlayerReadyParams> CREATOR = createCREATOR(
                    PlayerReadyParams.class, null);
        }
    }

    public static class PlayerLocalAction {
        public static final String ACTION_CMD = "ACTION_CMD_PLAY_LOCAL";

        public static class PlayLocalActionParams extends JObject {
            public String url = null;
            public String name = null;

            public static final Parcelable.Creator<PlayerLocalAction> CREATOR = createCREATOR(
                    PlayerLocalAction.class, null);
        }
    }

    public static class StartPlayerAction {
        public static final String ACTION_CMD = "ACTION_CMD_START_PLAYER";

        public static class StartPlayerActionParams extends JObject {
            public String url = null;
            public String name = null;
            public String type = null;

            public static final Parcelable.Creator<StartPlayerAction> CREATOR = createCREATOR(
                    StartPlayerAction.class, null);
        }
    }

    public static class StartLiveAction {
        public static final String ACTION_CMD = "ACTION_CMD_START_LIVE";

        public static class StartLiveActionParams extends JObject {
            public String url = null;
            public String name = null;

            public static final Parcelable.Creator<StartLiveAction> CREATOR = createCREATOR(
                    StartLiveAction.class, null);
        }
    }

    public static class PausePlayerAction {
        public static final String ACTION_CMD = "ACTION_CMD_PAUSE_PLAYER";
    }

    public static class ResumePlayerAction {
        public static final String ACTION_CMD = "ACTION_CMD_RESTART_PLAYER";
    }

    public static class SeekPlayerAction {
        public static final String ACTION_CMD = "ACTION_CMD_SEEK_PLAYER";

        public static class SeekPlayerActionParams extends JObject {
            public int location = 0;

            public static final Parcelable.Creator<StartPlayerAction> CREATOR = createCREATOR(
                    StartPlayerAction.class, null);
        }
    }

    public static class StopPlayerAction {
        public static final String ACTION_CMD = "ACTION_CMD_STOP_PLAYER";
    }

    public static class IsPlayingAction {
        public static final String ACTION_CMD = "ACTION_CMD_ISPLAYING";

        public static class IsPlayingparams extends JObject {
            public boolean isPlaying = false;
        }
    }

    public static class GetCurrentTimeAction {
        public static final String ACTION_CMD = "ACTION_CMD_GETCURRENTTIME";

        public static class GetCurrentTimeparams extends JObject {
            public int currentTime = 0;
        }
    }

    public static class GetDurationAction {
        public static final String ACTION_CMD = "ACTION_CMD_GETDURATION";

        public static class GetDurationparams extends JObject {
            public int totalTime = 0;
        }
    }

    public static class OnPlayerBack {
        public static final String ACTION_CMD = "ACTION_CMD_ON_PLAYER_BACK";

        public static class OnPlayerBackparams extends JObject {
            public String name = "";
            public int currentTime = 0;
            public int totalTime = 0;
        }
    }

    public static class SwitchSrcLoadingAction {
        public static final String ACTION_CMD = "ACTION_CMD_SWITCH_LOADING";

        public static class SwitchSrcLoadingparams extends JObject {
            public String name = "";
            public String clarity = "";
        }
    }

    public static class SwitchSourceAction {
        public static final String ACTION_CMD = "ACTION_CMD_SWITCH_SOURCE";

        public static class SwitchSourceparams extends JObject {
            public String url = "";
            public String name = "";
            public int position = 0;
        }
    }

}
